package net.sk.china.front.constants;

/**
 * +----------------------------------------------------------------------
 * | Talk To [ 聊来改善地区金融服务环境，助力企业发展 ]
 * +----------------------------------------------------------------------
 * | Copyright (c) 2018-2024 聊来All rights reserved.
 * +----------------------------------------------------------------------
 * | Licensed ( <a href="http://www.apache.org/licenses/LICENSE-2.0">apache</a> )
 * +----------------------------------------------------------------------
 * | @Author: 聊来 <18970881148@qq.com>
 * +----------------------------------------------------------------------
 * | DateTime: 2024/6/4 14:27
 * +----------------------------------------------------------------------
 */
public class Constants {


    /** 文件、图片上传相关 */
    public static final String UPLOAD_TYPE_IMAGE = "image";
    public static final String UPLOAD_TYPE_FILE = "file";

    /** 手机验证码redis key */
    public static final String SMS_VALIDATE_PHONE = "sms_validate_code_";

    //------------------------------------------- 数字相关配置 ------------------------------------------------------------

    public static final Integer NUM_ZERO = 0;

    /** 用户默认头像 */
    public static final String USER_DEFAULT_AVATAR_CONFIG_KEY = "h5_avatar";

    /** 移动端找回密码 */
    public static final String RETRIEVE = "retrieve";

    /** PC端找回密码 */
    public static final String PC_RETRIEVE = "pcRetrieve";

    /** 移动端注册 */
    public static final String REGISTER = "register";

    /** PC端注册 */
    public static final String PC_REGISTER = "pcRegister";

    /** 短信配置 */
    public static final String CONFIG_KEY_SMS_CODE_TEMPLATE = "yunpian_template";
    public static final String CONFIG_KEY_SMS_CODE_APIKEY = "yunpian_apikey";
    public static final String CONFIG_KEY_SMS_CODE_URL = "yunpian_url";
    public static final String CONFIG_KEY_SMS_CODE_COUNT = "yunpian_count";

    /** 验证码redis key前缀 */
    public static final String VALIDATE_REDIS_KEY_PREFIX = "VALIDATE_CODE:";

    /** 小程序appId key */
    public static final String WECHAT_MINI_APPID = "routine_appid";
    /** 小程序appSecret key */
    public static final String WECHAT_MINI_APPSECRET = "routine_appsecret";

    /** 微信接口的正常码 */
    public static final String ZERO = "0";

    /** 用户登录方式 小程序 */
    public static final String USER_LOGIN_TYPE_PROGRAM = "routine";

    /** 第三方登录token类型 */
    public static final int THIRD_LOGIN_TOKEN_TYPE_PROGRAM  = 2;

    //-------------------------------------------微信官方接口地址------------------------------------------------------------
    /** 小程序登录凭证校验的url */
    public static final String WECHAT_MINI_SNS_AUTH_CODE2SESSION_URL = "https://api.weixin.qq.com/sns/jscode2session?appid={}&secret={}&js_code={}&grant_type=authorization_code";

    /** 订单缓存时间 */
    public static final long ORDER_CASH_CONFIRM = 60;

    /** 微信支付开关 */
    public static final String CONFIG_PAY_WEIXIN_OPEN  = "pay_weixin_open";
    /** 余额支付状态 */
    public static final String CONFIG_YUE_PAY_STATUS  = "yue_pay_status";
    /** 支付宝支付状态 */
    public static final String CONFIG_ALI_PAY_STATUS = "ali_pay_status";

    /** 是否开启门店自提 */
    public static final String CONFIG_KEY_STORE_SELF_MENTION = "store_self_mention";

    /** 积分抵用比例(1积分抵多少金额) */
    public static final String CONFIG_KEY_INTEGRAL_RATE = "integral_ratio";

    public static final String CONFIG_KEY_INTEGRAL_RATE_ORDER_GIVE = "order_give_integral";

    public static final String ORDER_STATUS_CACHE_CREATE_ORDER = "cache_key_create_order";

    // 订单取消Key
    public static final String ORDER_AUTO_CANCEL_KEY = "order_auto_cancel_key";

    //------------------------------------------- 订单状态 ------------------------------------------------------------
    public static final int ORDER_STATUS_H5_UNPAID = 0; // 未支付
    public static final int ORDER_STATUS_H5_NOT_SHIPPED = 1; // 待发货
    public static final int ORDER_STATUS_H5_SPIKE = 2; // 待收货
    public static final int ORDER_STATUS_H5_JUDGE = 3; // 待评价
    public static final int ORDER_STATUS_H5_COMPLETE = 4; // 已完成
    public static final int ORDER_STATUS_H5_VERIFICATION = 5; // 待核销
    public static final int ORDER_STATUS_H5_REFUNDING = -1; // 退款中
    public static final int ORDER_STATUS_H5_REFUNDED = -2; // 已退款
    public static final int ORDER_STATUS_H5_REFUND = -3; // 退款

    public static final int ORDER_STATUS_INT_PAID = 0; //已支付
    public static final int ORDER_STATUS_INT_SPIKE = 1; //待收货
    public static final int ORDER_STATUS_INT_BARGAIN = 2; //已收货，待评价
    public static final int ORDER_STATUS_INT_COMPLETE = 3; //已完成

    /** 腾讯地图key */
    public static final String CONFIG_SITE_TENG_XUN_MAP_KEY = "tengxun_map_key";

    //------------------------------------------- 订单操作类型 ------------------------------------------------------------
    /** 待收货 KEY */
    public static final String ORDER_STATUS_STR_SPIKE_KEY = "send";

    /** 快递 */
    public static final String ORDER_LOG_EXPRESS = "express";
    /** 送货 */
    public static final String ORDER_LOG_DELIVERY = "delivery";

    /** 虚拟发货 */
    public static final String ORDER_LOG_DELIVERY_VI = "delivery_fictitious";

    /** 申请退款 */
    public static final String ORDER_LOG_REFUND_APPLY = "apply_refund";

    //------------------------------------------- 支付方式 ------------------------------------------------------------
    /** 微信支付 */
    public static final String PAY_TYPE_WE_CHAT = "weixin";
    /** 余额支付 */
    public static final String PAY_TYPE_YUE = "yue";
    /** 线下支付 */
    public static final String PAY_TYPE_OFFLINE = "offline";
    /** 支付宝 */
    public static final String PAY_TYPE_ALI_PAY = "alipay";

    //------------------------------------------- 订单操作redis队列 ------------------------------------------------------------

    /** 用户完成订单后续操作 */
    public static final String ORDER_TASK_REDIS_KEY_AFTER_COMPLETE_BY_USER = "alterOrderCompleteByUser";

    /** 用户取消订单后续操作 */
    public static final String ORDER_TASK_REDIS_KEY_AFTER_CANCEL_BY_USER = "alterOrderCancelByUser";

    /** 订单支付成功后Task */
    public static final String ORDER_TASK_PAY_SUCCESS_AFTER = "orderPaySuccessTask";
    /** 订单收货后Task */
    public static final String ORDER_TASK_REDIS_KEY_AFTER_TAKE_BY_USER = "alterOrderTakeByUser";

    /** 退款理由 */
    public static final String CONFIG_KEY_STORE_REASON = "store_reason";

    /** 分站城市行政编码 */
    public static final String CITY_AREA_CODE = "areaCode";

}

